<!--审核会员页面-->
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <h4 class="modal-title" id="myModalLabel">审核物品放行</h4>
</div>


<div class="modal-body">

    <!--如果没有错误 显示-->

    {if $errmsg==''}
    <form class="form-horizontal">


        <div class="panel panel-default">
            <div class="panel-heading">住户信息</div>
            <div class="panel-body">
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">姓名</label>
                    <div class="col-sm-10">
                        <input type="email"  readonly class="form-control" id="inputEmail3" value="{$memberInfo['realname']}" placeholder="">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">手机号码</label>
                    <div class="col-sm-10">
                        <input type="text" readonly class="form-control" value="{$memberInfo['mobile']}"  id="inputPassword3" placeholder="">
                    </div>
                </div>
            </div>
        </div>

        <div class="panel panel-danger">
            <div class="panel-heading">物品放行申请信息</div>
            <div class="panel-body">
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">申请人姓名</label>
                    <div class="col-sm-10">
                        <input type="email"  readonly class="form-control" id="inputEmail3" value="{$deliveryApplyRecord['sponsor_name']}" placeholder="">
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">申请人手机号码</label>
                    <div class="col-sm-10">
                        <input type="email"  readonly class="form-control" id="inputEmail3" value="{$deliveryApplyRecord['sponsor_mobile']}" placeholder="">
                    </div>
                </div>

                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">申请人车牌号</label>
                    <div class="col-sm-10">
                        <input type="email"  readonly class="form-control" id="inputEmail3" value="{$deliveryApplyRecord['sponsor_platenumber']}" placeholder="">
                    </div>
                </div>


                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">物品招照片</label>
                    <div class="col-sm-10">
                        <input type="email"  readonly class="form-control" id="inputEmail3" value="{$deliveryApplyRecord['realname']}" placeholder="">
                    </div>
                </div>


                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">时间段</label>
                    <div class="col-sm-10">
                        <input type="email"  readonly class="form-control" id="inputEmail3" value=" {php echo date('Y-m-d', $deliveryApplyRecord['start_time']). '~' . date('Y-m-d', $deliveryApplyRecord['end_time']);}" placeholder="">
                    </div>
                </div>

            </div>
        </div>


    </form>
    {else}
    <div class="alert alert-danger" role="alert">

        {$errmsg}

    </div>
    {/if}

</div>


<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
    {if $errmsg==''}
        <button type="button" onclick="checkdelivery({$deliveryApplyRecord['uid']},{$deliveryApplyRecord['id']})" class="btn btn-primary">通过审核</button>
    {/if}
</div>




<script>
    //通过审核
    function checkdelivery(uid,apply_id) {
        var _uid = uid;
        var _apply_id = apply_id;
        $.post("{php echo $this->createWebUrl('checkdeliveryapply',array('op'=>'check'))}",
            {'id':_apply_id,'uid' : _uid},

            function(data) {
                console.log(data);
                var data = JSON.parse(data);
                if(data.errCode == 0){
                    util.message(data.msg, 'refresh', 'success');
                }else{
                    util.message(data.msg, '', 'error');
                }
            });

    }
</script>

